setTimeout(() => {
  console.log('setTimout');
}, 0);

setImmediate/** ←node特有的,也是宏任务*/(() => {
  console.log('setImmediate');
});

const timeEnd = Date.now() + 2;
while (Date.now() < timeEnd) {

}

/** 永远都是setTimout先打印*/
